<template>
	<view class="handleVip">
		<view class="handleVip-plate-1">
			<view class="handleVip-plate-1-bg">
				<zhu-nav-bar :title="'办理会员'"></zhu-nav-bar>
				<view class="swiper-box">
					<swiper :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000" next-margin="30rpx" previous-margin="50rpx" @change="onChange">
						<swiper-item>
							<view class="swiper-item one">
								<view>
									借玩
									<text>300</text>
									元季卡
								</view>
								<text>有效期：一个季度</text>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="swiper-item two">
								<view>
									借玩
									<text>500</text>
									元季卡
								</view>
								<text>有效期：一年</text>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="swiper-item three">
								<view>
									借玩
									<text>800</text>
									元季卡
								</view>
								<text>有效期：一年</text>
							</view>
						</swiper-item>
					</swiper>
				</view>
			</view>
		</view>
		<view class="handleVip-plate-2">
			<view class="title">
				{{vip_title}}
			</view>
			<view class="content">
				<view class="item" v-for="(item,index) in itemArr" :key="index" v-if="index < num">
					<view class="top daj-center">
						<image :src="item.icon" mode="widthFix"></image>
					</view>
					<view class="bottom daj-center">
						<text>{{item.title}}</text>
						<text>{{item.desc}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="handleVip-plate-3">
			<view class="title">
				特权说明
			</view>
			<view class="content">
				<text space="emsp">
					1. 300元会员有效期一个季度，借玩300元以内的玩具，参考标准《会员系统产品价格管理》
					2. 积分可用于赔偿、抵现购买玩具。
					  丢失小件或损坏小件扣5分
						  严重损坏（严重影响到下一位小朋友的体验）扣30分
					3. 旧玩具可以拿到本店兑换积分。
					4. 以上卡类均不限次、不限时。
				</text>
			</view>
		</view>
		<navigator url="vipInfo/vipInfo" hover-class="none" open-type="navigate">
			<button class="big-bg-btn" hover-class="btn-bg-hover">立即办理</button>
		</navigator>
	</view>
</template>

<script>
	import zhuNavBar from '../../components/zhuNavBar.vue'
	export default {
		data() {
			return {
				vip_title:'季卡会员特权',
				itemArr:[
					{
						icon: require('@/static/img/orderHome/cart-icon.png'),
						title:'借玩玩具',
						desc:'300元以内'
					},
					{
						icon: require('@/static/img/orderHome/jifen-icon.png'),
						title:'补贴积分',
						desc:'30积分'
					},
					{
						icon: require('@/static/img/orderHome/shop-icon.png'),
						title:'享受出厂价',
						desc:'购买即可'
					},
					{
						icon: require('@/static/img/orderHome/shengri-icon.png'),
						title:'生日party',
						desc:'VIP专场'
					}
				],
				num:2
			};
		},
		components:{
			zhuNavBar
		},
		methods:{
			onChange(e){
				if(e.target.current == 0){
					this.vip_title = '季卡会员特权'
					this.num = 2
				}else if(e.target.current == 1){
					this.vip_title = '年卡会员特权'
					this.num = 4
				}else{
					this.vip_title = '年卡会员特权'
					this.num = 4
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
.handleVip{
	width: 100vw;
	min-height: 100vh;
	background-color: #f9f9f9;
	.handleVip-plate-1{
		width: 100vw;
		height: 416rpx;
		background-color: #1F2029;
		.handleVip-plate-1-bg{
			width: 100vw;
			height: 416rpx;
			background-image: url(../../../static/img/orderHome/vip-top-bg.png);
			background-size: 100% 100%;
			padding-top: calc(146rpx + var(--status-bar-height));
			.swiper-box{
				.swiper-item{
					width: 650rpx;
					height: 260rpx;
					background-size: 100% 100%;
					border-top-left-radius: 20rpx;
					border-top-right-radius: 20rpx;
					padding-top: 69rpx;
					padding-left: 50rpx;
					view{
						font-size: 42rpx;
						font-family: alibaba;
						margin-bottom: 29rpx;
						text{
							font-family: Arial, Helvetica, sans-serif;
							font-weight: 700;
						}
					}
					>text{
						font-size: 28rpx;
						font-weight: 500;
					}
				}
				.one{
					background-image: url(../../../static/img/orderHome/vip-300-bg.png);
					color: #7e5130;
				}
				.two{
					background-image: url(../../../static/img/orderHome/vip-500-bg.png);
					color: #707580;
				}
				.three{
					background-image: url(../../../static/img/orderHome/vip-800-bg.png);
					color: #7F6140;
				}
				
			}
		}
	}
	.handleVip-plate-2{
		padding: 38rpx 30rpx 50rpx 30rpx;
		.title{
			font-size: 32rpx;
			font-weight: 700;
			color: #111111;
			margin-bottom: 30rpx;
		}
		.content{
			display: flex;
			align-items: center;
			.item{
				margin-right: 20rpx;
				width: 200rpx;
				height: 240rpx;
				background: #fefdfe;
				border-radius: 10rpx;
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				.top{
					width: 86rpx;
					height: 86rpx;
					background: #ffffff;
					border: 2rpx solid #fade80;
					margin-bottom: 26rpx;
					border-radius: 50%;
					image{
						width: 54rpx;
					}
				}
				.bottom{
					flex-direction: column;
					text:first-child{
						font-size: 30rpx;
						font-weight: 500;
						color: #333333;
						margin-bottom: 26rpx;
					}
					text:last-child{
						font-size: 24rpx;
						font-weight: 700;
						color: #c29940;
					}
				}
			}
		}
	}
	.handleVip-plate-3{
		padding: 0rpx 30rpx 30rpx 30rpx;
		.title{
			font-size: 32rpx;
			font-weight: 700;
			color: #111111;
			margin-bottom: 30rpx;
		}
		.content{
			font-size: 28rpx;
			font-weight: 500;
			color: #666666;
			line-height: 45rpx;
		}
	}
}
</style>
